This notebook is intended to be used for reading and plotting data from ECLIPSE summary files, i.e. UNSMRY
and SMSPEC
files, thus it can also be used to read the files written by the Flow reservoir simulator.
This notebook uses the ecl_sum
module from the ecl
library in the ERT package.
In [119]:
from ert.ecl import ecl_sum
import numpy as np
from matplotlib import pyplot as plt
#summary_path = '/home/einar/fieldopt_output/5SPOT'
#summary_path = '/home/einar/Documents/testpit/simulation/flow/spe9/SPE9'
#summary_path = '/home/einar/Documents/testpit/simulation/flow/spe1/SPE1CASE1'
#summary_path = '/home/einar/Documents/GitHub/PCG/FieldOpt/examples/ECLIPSE/HORZWELL/HORZWELL'
summary_path = '/home/einar/Documents/GitHub/PCG/FieldOpt/examples/Flow/5spot/5SPOT'
#summary_path = '/home/einar/Documents/GitHub/PCG/FieldOpt/examples/Flow/norne/NORNE_ATW2013'
In [120]:
sum = ecl_sum.EclSum(summary_path)
print 'Case: ', sum.case
print 'Wells: ', sum.wells()
#print 'Groups: ', sum.groups()
#print 'Keys: ', sum.keys()
#print 'Time: ', sum.get_days()
In [137]:
sum = ecl_sum.EclSum(summary_path)
data = {}
for key in sum.keys():
data[key] = sum.get_values(key)
%matplotlib inline
for key in data.keys():
if key.split(':')[0] == 'WOPT':
plt.plot(sum.get_days(), data[key])
In [ ]: